package me.firstapp.manage.point;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

import me.firstapp.common.json.SingleObject;
import me.firstapp.common.module.bbs.JsonPointAccount;
import me.firstapp.manage.common.BaseManage;
import me.firstapp.spi.shop.PointService;

@Controller
@RequestMapping(value = "/pointAccountTraceManage")
public class PointAccountTraceManagePage extends BaseManage {

	@Autowired
	private PointService pointService;

	@RequestMapping(value = "/pointAccountTraceList.html", method = RequestMethod.GET)
	public ModelAndView orderListView(Long memberId, HttpServletRequest request, HttpServletResponse response,
			ModelMap modelMap) {
		modelMap.put("memberId", memberId);
		SingleObject<JsonPointAccount> result = pointService.findPointAccount(memberId);
		modelMap.put("pointAccount", result.getObject());
		return new ModelAndView("point/pointAccountTraceList", modelMap);
	}

}
